<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //声明一个数组
    const xiyou = ['swk','zbj','ss','bgj']
    //使用for of 遍历数组
    for(let v of xiyou){
      console.log(v)
    }
    
    for(let i in xiyou){
      console.log(i)
    }

    let iterator = xiyou[Symbol.iterator]()
    console.log(iterator.next())
    console.log(iterator.next())
    console.log(iterator.next())
    console.log(iterator.next())
    console.log(iterator.next())
  </script>
</body>
</html>